package com.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

@Configuration
public class AppConfig {

    @Bean
    public ExecutorService threadPoolExecutor() {
        // 创建一个固定大小为3的线程池
        return Executors.newFixedThreadPool(3);
    }

    @Bean
    public com.Service.TimeTaskService timeTaskService() {
        return new com.Service.TimeTaskService();
    }
}